package com.ssyt.yt1.day9.homework.oop;

/**
 * 组
 * 
 * @author Administrator
 *
 */
public class Group {

	private String name;
	private Student[] students;

	public Group() {
		super();
	}

	public Group(String name, Student[] students) {
		super();
		this.setName(name);
		this.setStudents(students);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Student[] getStudents() {
		return students;
	}

	public void setStudents(Student[] students) {
		this.students = students;
	}

	/**
	 * <pre>
	 * 输入指定小组名，能查询到其下的所有学生信息
	 *       你查询的小组名为"高富帅"：
	 *       	  |—— 菜头
	 *       	  |—— 小怪wu
	 * </pre>
	 */
	public void printStudenInfo() {
		System.out.println("你查询的小组名为" + this.name + "：");
		Student[] students = this.getStudents();
		for (int j = 0; j < students.length; j++) {
			System.out.println("|—— " + students[j].getName());
		}
	}
}
